package org.xjtu.weteam.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.xjtu.weteam.model.domain.Task;
import org.xjtu.weteam.model.dto.StatusNumDTO;
import org.xjtu.weteam.model.dto.TaskDTO;

import java.util.List;

/**
 * @author Kevin
 */
public interface TaskService extends IService<Task> {
    List<Task> taskSearchAll(Integer projectId);

    List<TaskDTO> taskSelectAllByUser(String token, String status);

    List<StatusNumDTO> selectStatusNum(String token);

    List<Task> selectAllParent(Integer projectid, Integer taskId);
    List<Task> selectAllSon(Integer projectid, Integer taskId);

    Integer changeTaskStatus(Integer taskId, String newStatus);

    Integer createTask(Task task);

    Task getByItsId(Integer integer);

    void updateParent(Task task);

    List<Task> selectSons(Integer taskId);

    void updateByItsId(Task task);

}
